package com.pinda.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.pinda.base.entity.PdTruckDriver;
import com.pinda.mapper.PdTruckDriverMapper;
import com.pinda.service.IPdTruckDriverService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 * 司机表 服务实现类
 * </p>
 *
 * @author lc
 * @since 2023-06-14
 */
@Service
public class PdTruckDriverServiceImpl extends ServiceImpl<PdTruckDriverMapper, PdTruckDriver> implements IPdTruckDriverService {
    @Resource
    PdTruckDriverMapper pdTruckDriverMapper;
    @Override
    public PdTruckDriver selectByUserId(String userId) {
        QueryWrapper<PdTruckDriver> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("user_id",userId);
        PdTruckDriver pdTruckDriver = pdTruckDriverMapper.selectOne(queryWrapper);
        return pdTruckDriver;
    }
}
